Function.prototype.myCall = function (caller, ...args) {
  let temp = "_temp"; // 或者 let temp = Symbol();
  caller[temp] = this;
  caller[temp](...args);
  delete caller[temp];
};

//箭头函数没有自己的this,所以这里只能是function
function displayUser(state, country) {
  console.log("Name : ", this.name);
  console.log("City : ", this.city);
  console.log("State : ", state);
  console.log("Country : ", country);
}

let user = {
  name: "John Stewart",
  city: "Sanfrancisco",
};

displayUser.myCall(user, "CA", "USA");
